/*
 * Copyright (c) 2008, 2016, OneAPM and/or its affiliates. All rights reserved.
 */
package me.yufan.chess.ui;

/**
 * Title: GameImage
 * Description: 游戏图形处理库
 *
 * @author Yufan
 * @version 1.0.0
 * @since 2016-01-26 23:54
 */
public enum GameImage {
    // TODO Define Image
    ;

    /**
     * Value to scale UI components by.
     */
    private static float uiScale;

    /**
     * The unscaled container height that uiScale is based on.
     */
    private static final int UNSCALED_HEIGHT = 768;

    /**
     * Container dimensions.
     */
    private static int containerWidth, containerHeight;

    /**
     * Returns the UI scale.
     */
    public static float getUiScale() {
        return uiScale;
    }

    /**
     * Initializes the GameImage class with container dimensions.
     *
     * @param width  the container width
     * @param height the container height
     */
    public static void init(int width, int height) {
        containerWidth = width;
        containerHeight = height;
        uiScale = (float) containerHeight / UNSCALED_HEIGHT;
    }
}
